
#pragma once

#include "base/core/singleton.h"
#include "Common/TableDefine.h"


class PkmodeDeathPenaltyCfg : public ManualSingleton <PkmodeDeathPenaltyCfg>
{
	friend ManualSingleton <PkmodeDeathPenaltyCfg>;
public:
	PkmodeDeathPenaltyCfg();
	~PkmodeDeathPenaltyCfg();
	bool Init(const char *szCfgFile, const char *szSplitChar);
	bool UnInit();
	void Clear();
	const PkmodeDeathPenaltyCfgInfo *GetPkmodeDeathPenaltyCfgInfo(int32_t deathPenaltyId);
	const PkmodeDeathPenaltyCfgMap *GetPkmodeDeathPenaltyCfgMap() { return &m_PkmodeDeathPenaltyCfgMap; }
private:
	PkmodeDeathPenaltyCfgMap m_PkmodeDeathPenaltyCfgMap;
};

#define  g_MakePkmodeDeathPenaltyCfgTable() (PkmodeDeathPenaltyCfg::Instance())
#define  g_GetPkmodeDeathPenaltyCfgTable() (PkmodeDeathPenaltyCfg::GetInstance())
#define  g_DelPkmodeDeathPenaltyCfgTable() (PkmodeDeathPenaltyCfg::Destroy())